{include file="index@index/head" /}
<div class="membox">
  <div class="wrap"> {include file="index@index/member/menu" /}
    <div class="mright">
      <div class="mtit">
        <h2>修改密码</h2>
      </div>
      <form method="post" action="{:url('Member/doUpdatepass')}" data-type="account">          
        <div class="mem-form">									
            <ul class="form">										 
                <li><span><i>*</i>手机号码 ：</span> <div class="intxt">{$meminfo.mobile} </div></li>
                <li><span>原密码 ：</span>
                        <input type="password" name="oldpassword" maxlength="20" autocomplete="off" placeholder="请输原密码" class="intxt">
                </li>
                <li><span><i>*</i>新密码 ：</span>
                        <input type="password" name="password" maxlength="20" id="a_name" autocomplete="off" placeholder="请输入密码" class="intxt">
                </li>              
                    <li><span><i>*</i>重复密码 ：</span>
                        <input type="password" name="repassword" maxlength="20" id="a_address" autocomplete="off" placeholder="请再次输入新密码" class="intxt">
                </li>
                <li class="b">
                        <span></span>
                        <input type="submit" class="btns" value="确定">
                </li>
            </ul>
        </div>
      </form>
    </div>
  </div>
</div> 
<script>
$(document).on('submit', 'form[data-type=account]', function () {
    var url = $(this).attr('action');
    var data = $(this).serializeArray();     
    var load = layer.load(1);
    $.post(url, data, function (res) {
        layer.close(load);
        if (res.code == 0) {
            layer.alert(res.msg, { icon: 1 }, function () {
                window.location.href="/index/Login/index"
            });
        } else {
            layer.alert(res.msg, {
                icon: 2
            });
        }
    }, "JSON");
    return false;
})
</script> 
{include file="index@index/foot" /} 